package com.ruoyi.withdraw.service;

import java.util.List;
import com.ruoyi.withdraw.domain.DistributionWithdraw;

/**
 * 提现申请Service接口
 * 
 * @author ruoyi
 * @date 2025-10-11
 */
public interface IDistributionWithdrawService 
{
    /**
     * 查询提现申请
     * 
     * @param withdrawId 提现申请主键
     * @return 提现申请
     */
    public DistributionWithdraw selectDistributionWithdrawByWithdrawId(Long withdrawId);

    /**
     * 查询提现申请列表
     * 
     * @param distributionWithdraw 提现申请
     * @return 提现申请集合
     */
    public List<DistributionWithdraw> selectDistributionWithdrawList(DistributionWithdraw distributionWithdraw);

    /**
     * 新增提现申请
     * 
     * @param distributionWithdraw 提现申请
     * @return 结果
     */
    public int insertDistributionWithdraw(DistributionWithdraw distributionWithdraw);

    /**
     * 修改提现申请
     * 
     * @param distributionWithdraw 提现申请
     * @return 结果
     */
    public int updateDistributionWithdraw(DistributionWithdraw distributionWithdraw);

    /**
     * 批量删除提现申请
     * 
     * @param withdrawIds 需要删除的提现申请主键集合
     * @return 结果
     */
    public int deleteDistributionWithdrawByWithdrawIds(Long[] withdrawIds);

    /**
     * 删除提现申请信息
     * 
     * @param withdrawId 提现申请主键
     * @return 结果
     */
    public int deleteDistributionWithdrawByWithdrawId(Long withdrawId);

    /**
     * 提交提现申请
     * @param distributorId 分销员ID
     * @param amount 提现金额
     * @param paymentType 支付方式
     * @param paymentAccount 收款账号
     * @param paymentName 收款人姓名
     * @return 提现申请结果
     */
    public DistributionWithdraw submitWithdrawApplication(Long distributorId, java.math.BigDecimal amount,
                                                          String paymentType, String paymentAccount, String paymentName);

    /**
     * 审核提现申请
     * @param withdrawId 提现申请ID
     * @param auditStatus 审核状态 1-通过 4-拒绝
     * @param auditRemark 审核备注
     * @param auditorId 审核人ID
     * @return 审核结果
     */
    public boolean auditWithdrawApplication(Long withdrawId, String auditStatus, String auditRemark, Long auditorId);

    /**
     * 执行打款操作
     * @param withdrawId 提现申请ID
     * @return 打款结果
     */
    public boolean executePayment(Long withdrawId);

    /**
     * 查询分销员的提现记录
     * @param distributorId 分销员ID
     * @return 提现记录列表
     */
    public List<DistributionWithdraw> selectWithdrawListByDistributorId(Long distributorId);
}

